package com.usian.article.controller.v1;

import com.usian.apis.article.ApCollectionControllerApi;
import com.usian.article.service.ApArticleService;
import com.usian.article.service.ApCollectionService;
import com.usian.model.article.dtos.CollectionBehaviorDto;
import com.usian.model.article.pojos.ApCollection;
import com.usian.model.common.dtos.ResponseResult;
import com.usian.model.common.enums.AppHttpCodeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/collection_behavior")
public class ApCollectionController implements ApCollectionControllerApi {

    @Autowired
    private ApCollectionService apCollectionService;


    @PostMapping
    @Override
    public ResponseResult saveCollection(@RequestBody CollectionBehaviorDto collectionBehaviorDto) {
        apCollectionService.saveCollection(collectionBehaviorDto);
        return ResponseResult.okResult(AppHttpCodeEnum.SUCCESS);
    }
}
